<template>
    <div>
        <p>Home</p>
    </div>
</template>


<script setup>
import { useRouter, useRoute } from 'vue-router';
const router = useRouter()
const route = useRoute()

console.log(router);//相当于this.$router
console.log(route);//相当于this.$router

import { computed } from 'vue';
import { useStore } from 'vuex'

const store = useStore() //相当于 this.$store
//state
const count = computed(() => store.state.count)
console.log(count.value);

//mutation
store.commit('increment')
console.log(count.value);

</script>

<style scoped lang="scss">
div {
    p {
        color: rgb(0, 204, 255);
    }
}
</style>